<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-3.5.1.js"></script>
    <style type="text/css">
        .default{
            background-color: red;
        }
    </style>
</head>
<body>
<div>
    <input type="text" name="name"/>
    <textarea id = "area">123432</textarea>
    <ul>
        <li>张三</li>
        <li>李四</li>
        <li>王宝强</li>
    </ul>
</div>
<button type="button" id="button" >点击执行</button>
<button type="button" onclick="doc()">点击进行文档操作</button>
<script type="text/javascript">
    function chance(){
        $("div").addClass("default");
        let val = $(":input").val("修改后");
        console.log(val);
    }
    $("#button").click(function () {
        $("div").addClass("default");
    });
    function doc(){
        $("ul").append("<li>apend</li>");
        $("ul").before("<li>before</li>")
    }

</script>
</body>
</html>